<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>启动倒计时</title>
</head>

<body>
    <div class="output"></div>
    <script>
        var output = document.querySelector('.output');
        output.innerHTML = '';

        var i = 10;
        while (i >= 0) {

            para = document.createElement('p');
            if (i == 10) {
                para.textContent = "Countdown 10";
            } else if (i == 0) {
                para.textContent = "Blast off";
            } else {
                para.textContent = i;
            }

            output.appendChild(para);
            i--;
        }
    </script>
</body>

</html>